Stygian.hibernating = {arnica = "Klangiary",
                        calamus = "Dioni",
                        chervil = "Roarkian",
                        colewort = "Kiani",
                        coltsfoot = "Juliary",
                        earwort = "Dioni",
                        faeleaf = "Juliary",
                        flax = "Estar",
                        galingale = "Shanthin",
                        horehound = "Vestian",
                        juniper = "Dioni",
                        kafe = "Urlachmar",
                        kombu = "Dioni",
                        marjoram = "Shanthin",
                        merbloom = "Estar",
                        mistletoe = "Avechary",
                        myrtle = "Estar",
                        pennyroyal = "Klangiary",
                        reishi = "Tzarin",
                        rosehips = "Shanthin",
                        sage = "Dioni",
                        sargassum = "Tzarin",
                        sparkleberry = "Dvarsh",
                        weed = "Estar",
                        wormwood = "Vestian",
                        yarrow = "Roarkian"}
Stygian.date = Stygian.date or {month = "Klangiary", day = "1", year = "255"}
if Stygian.harvesting == nil then Stygian.harvesting = false end

function Stygian_harvest(type, amount)
  if Stygian.harvesting then 
    SDebug("harvester", "Ok, we are in fact attempting to harvest")
    if Stygian.date.month == Stygian.hibernating[type] then 
      secho("This herb is hibernating, let it rest!")
      return 
    end
    amount = amount - 5
    if amount > 1 then
      for i=1,amount do
	SDebug("harvester", "Type:amountleft " .. type .. ":" .. amount - i)
        Stygian_chaser([[send("harvest ]] .. type .. [[")]], {consumesEq = false})
      end
      Stygian_chaser([[send("inr all spices");send("inr all ]] .. type .. [[");tempTimer(1, function() send("") end)]], {consumesEq = false})
      secho("Harvesting " .. amount .. " " .. type .. "")
    elseif amount == 1 then
      Stygian_chaser([[send("harvest ]] .. type .. [[")]], {consumesEq = false})
      Stygian_chaser([[send("inr all spices");send("inr all ]] .. type .. [[");tempTimer(1, function() send("") end)]], {consumesEq = false})
      secho("Only 1  " .. type .. " to get")
    else
      secho("Sorry, not enough " .. type .. " to harvest any")
    end
  else 
    SDebug("It does not think we are harvesting")
  end
end

